
<template>
  <div class="ui-nav">
    <router-link :to="unit.link" tag="div" class="item" :key="index" v-for="(unit,index) in navlist">
      <svg class="icon" aria-hidden="true">
        <use :xlink:href="'#' + unit.icon"></use>
      </svg>
      <span class="item-text">{{unit.text}}</span>
    </router-link>
  </div>
</template>

<script>
  export default{
    name:'navbar',
    data(){
      return{
        checkindex:0,
        navlist:[{
          text:'组件',
          icon:'icon-shouye',
          link:'/components'
        },{
          text:'我的',
          icon:'icon-mine-gray',
          link:'/user'
        }]
      }
    },
    created(){
    },
    methods:{
    }
  }
</script>

<style scoped>
  .router-link-active{
    color: #222 !important;
  }

  .router-link-active svg{
    fill: #222 !important;
  }
</style>
